from django.db import models


class GroupeMot(models.Model):
    id_groupe = models.IntegerField(primary_key=True)
    titre = models.TextField()
    descriptif = models.TextField()
    texte = models.TextField()
    unseul = models.CharField(max_length=9)
    obligatoire = models.CharField(max_length=9)
    articles = models.CharField(max_length=9)
    breves = models.CharField(max_length=9)
    rubriques = models.CharField(max_length=9)
    syndic = models.CharField(max_length=9)
    minirezo = models.CharField(max_length=9)
    comite = models.CharField(max_length=9)
    forum = models.CharField(max_length=9)
    maj = models.DateTimeField()
    class Meta:
        db_table = u'spip_groupes_mots'

class Mot(models.Model):
    id_mot = models.IntegerField(primary_key=True)
    titre = models.TextField()
    descriptif = models.TextField()
    texte = models.TextField()
    id_groupe = models.IntegerField()
    type = models.TextField()
    extra = models.TextField(blank=True)
    idx = models.CharField(max_length=9)
    url_propre = models.CharField(max_length=765)
    maj = models.DateTimeField()
    class Meta:
        db_table = u'spip_mots'

class MotArticle(models.Model):
    id_mot = models.IntegerField()
    id_article = models.IntegerField(primary_key=True)
    class Meta:
        db_table = u'spip_mots_articles'

class MotBreve(models.Model):
    id_mot = models.IntegerField()
    id_breve = models.IntegerField(primary_key=True)
    class Meta:
        db_table = u'spip_mots_breves'

class MotDocument(models.Model):
    id_mot = models.IntegerField()
    id_document = models.IntegerField(primary_key=True)
    class Meta:
        db_table = u'spip_mots_documents'

class MotForum(models.Model):
    id_mot = models.IntegerField()
    id_forum = models.IntegerField(primary_key=True)
    class Meta:
        db_table = u'spip_mots_forum'

class MotRubrique(models.Model):
    id_mot = models.IntegerField()
    id_rubrique = models.IntegerField(primary_key=True)
    class Meta:
        db_table = u'spip_mots_rubriques'

class MotSyndic(models.Model):
    id_mot = models.IntegerField()
    id_syndic = models.IntegerField(primary_key=True)
    class Meta:
        db_table = u'spip_mots_syndic'
